home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
Pakiet bezpieczenstwa
/
mini Pentoo LiveCD 2006.1
/
mpentoo-2006.1.iso
/
livecd.squashfs
/
usr
/
sbin
/
stopstick
< prev
next >
Wrap
Text File
|
2006-04-04
|
1KB
|
61 lines
#!/bin/sh
# Script to umount the usbstick
PENTOODIR="/mnt/usbstick/pentoo/"
DOROOT=0
DONESSUS=0
DOETC=0
DOFP=0
EXIT=0
doumount() {
sync
umount -f /$1 &>/dev/null
}
parse_opt() {
case "$1" in
*\=*)
echo "$1" | cut -f2 -d=
;;
esac
}
dostuff() {
# Pentoo config file exist, sourcing it and linking the files...
SOFTWARE=`cat ${PENTOODIR}.pentoorc`
for x in ${SOFTWARE}
do
case "${x}" in
root)
DOROOT=1
;;
etc)
DOETC=1
;;
esac
done
if [ "${DOROOT}" -eq '1' ]; then
echo " Unmounting /root from usbstick..."
doumount root
fi
if [ "${DOETC}" -eq '1' ]; then
echo " Unmounting /etc from usbstick..."
doumount etc
fi
# Job done, exiting
}
if [ -e /mnt/cdrom/pentoo/.pentoorc ]; then
PENTOODIR="/mnt/cdrom/pentoo/"
fi
if [ -e "${PENTOODIR}".pentoorc ]; then
dostuff
fi
rm -rf /tmp/soft